//********************************************************
// Info of Rebel
//created by tuan anh,31/12/2011
#include "Object.h"
#include "QuadTree.h"

const int MAX_SIZE			= 25;

class CRebel : public Object
{
public:
	//constructor
	CRebel();
	CRebel(LPD3DXSPRITE SurpriteHandler, float Scaling, CQuadTree*);
	~CRebel();
	//Process collision
	CQuadTree* m_Quadtree;
	//declare all the variable
	float m_FrameWidth;			//size of frame
	float m_FrameHeight;
	 
	int m_iX;					//position of frame
	int m_iY;
	int m_iRebIndex;			//current number of frame
	float m_fX;					//
	float m_fY;
	float m_fScaling;			//
	DWORD lastUpdate;
	int timeBetweenUpdated;
	//function
	void LoadSprite(LPD3DXSPRITE);
	void Update(int DeltaTime, int moveCame);
	bool moved_ob();
	void Render();
	void Collision(Object* Ob);
	//vector<Object*> edf;
	void Reset();
	void setRect();

	void Next();
	//Action of rebel
	void Move();
	//0
	void Suprise();
	void Talk();
	void sitDown();
	//1
	void Crawl();
	void Fly();
	//2
	void Reparing();
	void Throw();
	void Throw1();
	void TalkFone();
	//3
	void Stand();
	void Jump();
	void Fear();

	//
	void Die();
	void Die1();
	void Die2();
	void Die3();
	//
	void Release();
};